package com.qianli.user.enums;

/**
 * name:信用卡账单展示状态
 * auth:ting.li@qianli-inc.com
 * date:2018/1/11 10:09
 * version: v1.0.0
 **/
public enum CreditCardBillShowStatusEnum {
    NO_BILL(0,"无账单"),
    IMPORTING(1,"初始化，导入中"),
    IMPORTED(2,"已导入"),
    FAIL(3,"导入失败"),
    EXPIRED(4,"已过期"),
    CANCELED(5,"已取消");

    private Integer type;

    private String desc;

    CreditCardBillShowStatusEnum(Integer type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public Integer getType() {
        return type;
    }

    public CreditCardBillShowStatusEnum setType(Integer type) {
        this.type = type;
        return this;
    }

    public String getDesc() {
        return desc;
    }

    public CreditCardBillShowStatusEnum setDesc(String desc) {
        this.desc = desc;
        return this;
    }

    public static CreditCardBillShowStatusEnum getEnumByType(Integer type) {
        CreditCardBillShowStatusEnum creditCardBillStatusEnum = null;
        for (CreditCardBillShowStatusEnum e : CreditCardBillShowStatusEnum.values()) {
            if (e.getType().equals(type)) {
                creditCardBillStatusEnum = e;
            }
        }
        return creditCardBillStatusEnum;
    }
}
